package org.jeecg.modules.monitoring.j_monitoring.controller;

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;

import org.jeecg.modules.monitoring.j_monitoring.entity.NetworkInterfaceLog;
import org.jeecg.modules.monitoring.j_monitoring.service.INetworkInterfaceLogService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;

 /**
 * @Description: 网络接口记录
 * @Author: xiaoyq
 * @Date:   2023-05-23
 * @Version: V1.0
 */
@Api(tags="网络接口记录")
@RestController
@RequestMapping("/networkInterfaceLog/networkInterfaceLog")
@Slf4j
public class NetworkInterfaceLogController extends JeecgController<NetworkInterfaceLog, INetworkInterfaceLogService> {
	/**
	 * 分页列表查询
	 *
	 * @param networkInterfaceLog
	 * @param pageNo
	 * @param pageSize
	 * @param req
	 * @return
	 */
	//@AutoLog(value = "网络接口记录-分页列表查询")
	//@RequiresPermissions("网络资源:查询")
	@ApiOperation(value="网络接口记录-分页列表查询", notes="网络接口记录-分页列表查询")
	@GetMapping(value = "/list")
	public Result<IPage<NetworkInterfaceLog>> queryPageList(NetworkInterfaceLog networkInterfaceLog,
								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
								   HttpServletRequest req) {
		QueryWrapper<NetworkInterfaceLog> queryWrapper = QueryGenerator.initQueryWrapper(networkInterfaceLog, req.getParameterMap());
		Page<NetworkInterfaceLog> page = new Page<NetworkInterfaceLog>(pageNo, pageSize);
		IPage<NetworkInterfaceLog> pageList = service.page(page, queryWrapper);
		return Result.OK(pageList);
	}

}
